﻿using System.Web;
using EPiServer;
using EPiServer.Core.PropertySettings;
using EPiServer.Editor.TinyMCE;
using log4net;

namespace TemplateFoundation.UI.WebControls
{
    /// <summary>
    /// Rich-text editor to use for customized user interfaces inside the EPiServer UI
    /// </summary>
    public class Editor : EPiServer.Editor.TinyMCE.Editor
    {
        private static readonly ILog _logger = LogManager.GetLogger(typeof (Editor));

        /// <summary>
        /// Instantiates a new Editor control with basic default settings
        /// </summary>
        public Editor() 
            : base(
            (TinyMCESettings)new PropertySettingsRepository().GetDefault(typeof(TinyMCESettings)).PropertySettings, 
            HttpContext.Current.Handler as PageBase, 
            TinyMCEInitOptions.InitType.EditMode)
        {
            base.Height = 200;
        }
    }
}
